package org.smr.ministore.micro.client;

import java.util.List;

import org.blade.utils.Pager;
import org.smr.ministore.entities.GoodsImg;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("gateway.GoodsImg")
public interface FeignGoodsImgMicroServiceClient {

    @RequestMapping(method = RequestMethod.PUT, value = "/GoodsImg/batchSave")
    int batchSave(@RequestBody List< GoodsImg> entities);

    @RequestMapping(method = RequestMethod.POST, value = "/GoodsImg/batchModify")
    int batchModify(@RequestBody List< GoodsImg> entities);

    @RequestMapping(method = RequestMethod.PUT, value = "/GoodsImg/save")
    public int save(@RequestBody GoodsImg entity) ;

    @RequestMapping(method = RequestMethod.PATCH, value = "/GoodsImg/updateById")
    public int updateById(@RequestBody GoodsImg id);

    @RequestMapping(method = RequestMethod.GET, value = "/GoodsImg/queryById/{id}")
    public  GoodsImg queryById(@PathVariable("id")Long id);

    @RequestMapping(method = RequestMethod.DELETE, value = "/GoodsImg/deleteById/{id}")
    public int deleteById(@PathVariable("id")Long id);

    @RequestMapping(method = RequestMethod.POST, value = "/GoodsImg/paginate")
    public Pager<GoodsImg> paginate( @RequestBody GoodsImg entity, Long pageSize, Long pageNum);


    @RequestMapping( method = RequestMethod.POST, value = "/GoodsImg/getGoodsImgByGoods/{goodsId}")
    public List<GoodsImg> getGoodsImgByGoods(@PathVariable("goodsId")Long goodsId);

}
